<script setup>
//  封装
import { useVModel } from '@/config/useVModel.js'
const props = defineProps({
    modelValue: {
        type: Object,
        required: true,
    },
});
const emit = defineEmits(["update:modelValue"]);
const model = useVModel(props, 'modelValue', emit)
</script>

<template>
    <el-form :inline="true" :model="model" class="demo-form-inline">
        <el-form-item>
            <el-select v-model="model.selectedValue" placeholder="Select" style="width: 85px">
                <el-option v-for="item in model.Options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-input v-model="model.keyword" :placeholder="model.placeholder" clearable />
        </el-form-item>
    </el-form>
</template>

<style scoped>
.el-form--inline .el-form-item {
    margin-left: 20px;
    margin-right: 0px;
}

.demo-form-inline .el-input {
    --el-input-width: 180px;
}

.demo-form-inline .el-select {
    --el-select-width: 90px;
}
</style>
